module.exports = (req, res) => {
  require('../util/service').handlePost(req, res, (reqObj, resolve) => {
	const mongoMng = require('../mng/mongoMng')
    if (!mongoMng.db) {
      log('mongo未连接')
      resolve({
        result: -1,
        msg: '系统错误'
      })
      return
    }
    mongoMng.db.collection('note').find({}, (err, result) => {
      if (err) {
        log(err);
        resolve({
          result: -1,
          msg: '系统错误'
        })
        return;
      }
      var list = []
      result.forEach(item => {
        list.push({
          openid: item.openid,
          note: item.note
        })
      })
      resolve(list)
    });
  })
}
